package com.rambo.dsd.sys.dao.inter.po;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;

/**
 * Create by Rambo on 2017/6/21
 **/
@Entity(name = "role_user")
public class RoleUserPO {
    private String uuid;
    private String roleid;
    private String userid;
    private String mtype;

    @Id
    @Column(name = "UUID")
    public String getUuid() {
        return uuid;
    }

    public void setUuid(String uuid) {
        this.uuid = uuid;
    }

    @Basic
    @Column(name = "ROLEID")
    public String getRoleid() {
        return roleid;
    }

    public void setRoleid(String roleid) {
        this.roleid = roleid;
    }

    @Basic
    @Column(name = "USERID")
    public String getUserid() {
        return userid;
    }

    public void setUserid(String userid) {
        this.userid = userid;
    }

    @Basic
    @Column(name = "MTYPE")
    public String getMtype() {
        return mtype;
    }

    public void setMtype(String mtype) {
        this.mtype = mtype;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o)
            return true;
        if (o == null || getClass() != o.getClass())
            return false;

        RoleUserPO that = (RoleUserPO) o;

        if (uuid != null ? !uuid.equals(that.uuid) : that.uuid != null)
            return false;
        if (roleid != null ? !roleid.equals(that.roleid) : that.roleid != null)
            return false;
        if (userid != null ? !userid.equals(that.userid) : that.userid != null)
            return false;
        if (mtype != null ? !mtype.equals(that.mtype) : that.mtype != null)
            return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = uuid != null ? uuid.hashCode() : 0;
        result = 31 * result + (roleid != null ? roleid.hashCode() : 0);
        result = 31 * result + (userid != null ? userid.hashCode() : 0);
        result = 31 * result + (mtype != null ? mtype.hashCode() : 0);
        return result;
    }
}